package strings;

import java.util.*;

public class UsingStringBuilder{
    public static Random rand = new Random(47);
    public String toString(){
        StringBuilder result = new StringBuilder("[");
        for(int i = 0; i < 25; i++){
            result.append(rand.nextInt(100));
            result.append(", ");
        }
        result.delete(result.length() - 2, result.length());
        result.append("]");

        return result.toString();
    }
    public StringBuilder build(){
        StringBuilder result = new StringBuilder("123456789");
        return result;
    }

    public static void main(String[] args){
        UsingStringBuilder usb = new UsingStringBuilder();
        // System.out.println(usb);
        StringBuilder sb = usb.build();
        System.out.println(sb);
        System.out.println(sb.delete(7, 8));


    }
}







//
